package com.byb.server.service.mapper.Wc;

import com.byb.server.domain.WcProduct;
import com.byb.server.service.dto.Wc.ProductRankDTO;
import com.byb.server.service.mapper.EntityMapper;
import org.mapstruct.Mapper;

@Mapper(componentModel = "spring", uses = {})
public interface ProductRankMapper extends EntityMapper<ProductRankDTO,WcProduct>{

    ProductRankDTO toDto(WcProduct wcProduct);

    default WcProduct fromId(Long id) {
        if (id == null) {
            return null;
        }
        WcProduct wcProduct = new WcProduct();
        wcProduct.setId(id);
        return wcProduct;
    }
}
